package com.example.erp.mapper.permission;

import com.example.erp.dto.permissionDTO.UserRoleDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserRoleMapper {

    @Select("SELECT role_id FROM erp_user_role_mapping WHERE user_id = #{userId}")
    List<Long> getRoleIdByUserId(Long userId);

    Integer batchInsert(List<UserRoleDTO> list);

    Integer remove(Long id);
}
